package com.google.samples.apps.databinging.binding

/**
 * Created by Administrator on 2021/7/9 0009.
 * Describe:
 */
object BookRatingUtils {
    fun getRatingString(rating: Int): String {
        return when (rating) {
            0 -> "零星"
            1 -> "一星"
            2 -> "二星"
            3 -> "三星"
            4 -> "四星"
            5 -> "五星"
            in 6..Int.MAX_VALUE -> "五星"
            else -> "零星"
        }
    }
}